<?php
include ("inc/header.php");
$url="movie.php?menuname=1_2";
?>
<!--main start-->
<div class="main">
	<div class="video_list">
		<span class="left"></span>
		<span class="right"></span>
		<ul>
			<?
			 $sql="SELECT * FROM video where topshow=1 order by id desc limit 3";
			 $result=mysql_query($sql) or die(mysql_error());
			while ($rs=mysql_fetch_array($result)){
			?>
			<li><a href="movie_detail.php?id=<?=$rs["id"]?>"><img src="<?=$rs["imagepath"]?>" width="249" height="187"/></a></li>
			<?}?>
		</ul>
	</div>
	<div class="main_content">
		

		<!--main_right start-->
		<div class="main_right">
			<!--block start-->
			
			<div class="main_left_title2">Blog
				<div class="tip2"></div>
			</div>
			<div class="main_right_top">
				<?
				 $sql="SELECT * FROM blog where pic <> '' order by id desc limit 1";
				 $result=mysql_query($sql) or die(mysql_error());
				while ($rs=mysql_fetch_array($result)){
				?>
				<div class="main_right_top_title"><a href="blog_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></div>
				<img src="<?=$rs["pic"]?>" width="295" height="95"/>
				<?}?>
				<ul class="bottom">
					<?
					 $sql="SELECT * FROM blog order by id desc limit 5";
					 $result=mysql_query($sql) or die(mysql_error());
					while ($rs=mysql_fetch_array($result)){
					?>
					<li><p><a href="blog_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></p><span><?=$rs["operater"]?></span></li>
					<?
					}
					?>
				</ul>
				<div class="main_left_video_bottom"><a href="blog.php">View all</a></div>
				
			</div>
			<!--block end -->
			<!--block start--><!--block end -->
            <!--block start-->
            <!--block end -->
        </div>
		
		<div class="movie">
			<div class="movie_tip"></div>
			<div class="movie_title">Popular Video</div>
			<ul>
				<?
				 $sql="SELECT * FROM video order by id desc limit 9";
				 $result=mysql_query($sql) or die(mysql_error());
				 while ($rs=mysql_fetch_array($result)){
				?>
				<li><a href="movie_detail.php?id=<?=$rs["id"]?>"><img src="<?=$rs["imagepath"]?>" /></a><p><a href="movie_detail.php?id=<?=$rs["id"]?>"><?=$rs["title"]?></a></p></li>
				<?}?>
			</ul>
			<div class="main_left_video_bottom"><a href="movie_all.php">View all</a></div>
		</div>
		<!--main_right end-->
		<div style="clear:both;"></div>
  </div>
	
	<!--footer start-->
	<?php
		include ("inc/footer.php");
		?>
	<!--footer end-->
</div>
<!--main end-->

</body>
</html>
